/**  
 * @author Silvio Wangler
 */
class DefaultFilters {

    LastfmService lastfmService;

    def filters = {
        all(controller:'*', action: '*') {
            after = { Map model ->
                  log.debug("last.fm service is available: ${lastfmService != null ? 'yes' : 'no'}" )
                  println("Controller: ${controllerName}")
                  model['recenttracks'] = lastfmService.recentTracks('sa303')
            }
        }
    }

}